#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
	char word = 0;
	int N = 0;
	scanf("%c %d", &word, &N);
	for (int i = 0; i < N; i++)
	{
		int j = N-i;
		int k = i;
		while (j)
		{
			printf("%c", word + k);
			k++;
			j--;
		}
		printf("\n");
	}
	return 0;
}